package com.yudedu.hospital.controller;

import java.io.IOException;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yudedu.hospital.entity.BranchCourts;
import com.yudedu.hospital.service.UserService;
@Controller
public class YuyueController {
	@Resource
	UserService userService;

	@RequestMapping("yuyueindex")
	public Object yuyueindex() {
		return "yuyueindex";
	}
	@RequestMapping("yuyuedoctor")
	public Object yuyuedoctor() {
		return "yuyuedoctor";
	}
	@RequestMapping("yuyuedoctors")
	public Object yuyuedoctors() {
		return "yuyuedoctors";
	}
	@RequestMapping("yuyueleikedoctor")
	public Object yuyueleikedoctor() {
		return "yuyueleikedoctor";
	}
	@RequestMapping("yuyuefudoctor")
	public Object yuyuefudoctor() {
		return "yuyuefudoctor";
	}
	@RequestMapping("yuyuechildrendoctor")
	public Object yuyuechildrendoctor() {
		return "yuyuechildrendoctor";
	}
	@RequestMapping("yuyueleike")
	public Object yuyueleike() {
		return "yuyueleike";
	}
	@RequestMapping("yuyuefu")
	public Object yuyuefu() {
		return "yuyuefu";
	}
	@RequestMapping("yuyuechildren")
	public Object yuyuechildren() {
		return "yuyuechildren";
	}
	
	@RequestMapping("yuyuediqu")
	public void yuyuediqu(HttpServletRequest request,HttpServletResponse resp) throws IOException {
		Integer departid= Integer.valueOf(request.getParameter("id"));
		List<BranchCourts> branchCourts = userService.querybranchCourt(departid);
		request.getSession().setAttribute("branchCourts", branchCourts);
		System.out.println(branchCourts);
		resp.getWriter().println("32432");
	}
}
